package com.project.livetv.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.project.livetv.R;

import java.util.List;

/**
 * Created by li on 2016/5/10.
 */
public class MyHotTabAdapter extends MyBaseAdapter {
    List<String> list;
    Context mContext;
    public MyHotTabAdapter(Context context, List list) {
        super(context, list);
        this.list=list;
        mContext=context;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        MyViewHolder holder;
        if(convertView==null){
            convertView= LayoutInflater.from(mContext).inflate(R.layout.hot_listview_layout,parent,false);
            holder=new MyViewHolder(convertView);
            convertView.setTag(holder);
        }
        else{
            holder= (MyViewHolder) convertView.getTag();
        }
        holder.user_name.setText("好久不见");
        return convertView;
    }
    class MyViewHolder{
         TextView user_name,user_address,user_number;
        ImageView user_icon,user_info_icon;
        public MyViewHolder(View view){
            user_name= (TextView) view.findViewById(R.id.user_name);
            user_address= (TextView) view.findViewById(R.id.user_address);
            user_number= (TextView) view.findViewById(R.id.user_number);
            user_icon= (ImageView) view.findViewById(R.id.user_icon);
            user_info_icon= (ImageView) view.findViewById(R.id.user_info_icon);
        }
    }
}
